package com.mtwp.dfs.domain.region;

import lombok.Data;

import javax.persistence.*;
import java.util.Date;
import java.util.Set;

/*
行政区域地州市信息表
 */


@Data
@Entity
@Table(name = "dfs_cities")
public class City {

    /**
     * 更新时间
     */
    @Column(name = "updateTime")
    private Date updateTime;

    /**
     * 创建时间
     */
    @Column(name = "createTime")
    private Date createTime;

    /**
     * 编号
     */
    @Id
    private Integer id;

    private String cityid;
    private String city;

    @ManyToOne(cascade = CascadeType.ALL,fetch = FetchType.LAZY)
    @JoinColumn(name = "provinceid")
    private Province province;


    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY,mappedBy = "city")
    private Set<Area> areas;
}
